from tortoise import Tortoise, run_async
from tortoise.models import Model
from tortoise import fields

class AirportRWY(Model):
    id = fields.UUIDField(pk=True)
    code = fields.CharField(max_length=10, null=True)
    name = fields.CharField(max_length=50, null=True)
    airport_name = fields.CharField(max_length=100, null=True)
    longitude_start = fields.FloatField(null=True)
    latitude_start = fields.FloatField(null=True)
    longitude_end = fields.FloatField(null=True)
    latitude_end = fields.FloatField(null=True)

    def __str__(self):
        return self.name
